from stl_reader import *

def get_center(min_x,min_y,max_x,max_y):
    return np.array([(max_x-min_x)/2,(max_y-min_y)/2])



if __name__=="__main__":
    # in this example,the best solution is that user should manually input radius r,
    # so the method can recongnize the feature points
    file="test_file2.STL"
    array=get_unique_array(file)
    boundary_list=get_bondary(array)
    min_y=boundary_list[1]
    min_z=boundary_list[4]
    max_y=boundary_list[2]
    max_z=boundary_list[5]
    center=get_center(boundary_list[1],boundary_list[4],boundary_list[2],boundary_list[5])
    vertices_point_1=np.array([min_y,center[1]])
    vertices_point_2=np.array([center[0],max_z])
    vertices_point_3=np.array([max_y,center[1]])
    vertices_point_4=np.array([center[0],min_z])
